/**
 * @(#)IEmailService.java 2010-2-22
 *   
 * Copyright  (c) 2009-2010 Wilmar IT Service,  Inc.   
 * All  rights  reserved.   
 * TODO
 */

package com.wilmar.process.core.services.spi;

import java.io.Serializable;

import com.wilmar.process.entity.Email;
import com.wilmar.process.entity.ProcessParticipant;
import com.wilmar.process.entity.User;

/**
 * @author MaKuBEX Email:makubexnet@gmail.com
 * @version 1.0.0
 */
public interface IEmailService extends Serializable {
	/**
	 * 获取当前用户的邮件地址
	 * 
	 * @param user
	 *            用户实体
	 * @return 用户对应的邮件
	 */
	public String getEmailAddressByUser(User user);

	/**
	 * 发送邮件给参与人
	 * 
	 * @param email
	 *            邮件
	 * @param processParticipant
	 *            参与人
	 */
	public void sendMailToProcessParticipant(Email email,
			ProcessParticipant processParticipant);

	/**
	 * 发送邮件给指定的用户
	 * 
	 * @param email
	 *            邮件
	 * @param users
	 *            用户
	 */
	public void sendMailToUsers(Email email, User... users);
}
